package com.example.spinning.mapper;

import com.example.spinning.bean.SpinningSummary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SpinningSummaryMapper {

    //得到打包
    List<SpinningSummary> getSpinningSummary(@Param("start") Integer start, @Param("count") Integer count);

    //查找表的行数
    int getCountSpinningSummary();

    //根据条件查找表的行数
    int getCountSpinningSummaryByCondition(
            @Param("customer") String customer,
            @Param("workshop") String workshop,
            @Param("date") String date,
            @Param("batch_no") String batch_no,
            @Param("num") String num,
            @Param("composition") String composition);

    //根据id查找打包
    SpinningSummary getSpinningSummaryById(Long id);

    //根据条件查询打包
    List<SpinningSummary> getSpinningSummaryByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("customer") String customer,
            @Param("workshop") String workshop,
            @Param("date") String date,
            @Param("batch_no") String batch_no,
            @Param("num") String num,
            @Param("composition") String composition);

    //增加
    int addSpinningSummary(SpinningSummary spinningSummary);

    //修改
    int updateSpinningSummaryById(SpinningSummary spinningSummary);

    //删除
    int delSpinningSummaryById(@Param("ids") String[] ids);


}
